package com.crm.controller;

import com.crm.base.BaseController;
import com.crm.domain.entity.Customer;
import com.crm.service.CustomerService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 客户控制器
 */

@RestController
@RequestMapping("/customer")
public class CustomerController extends BaseController<CustomerService, Customer> {

    // 客户构成
    @RequestMapping("/component")
    public List<Map<String, Object>> component() {
        return baseService.findByCustomer();
    }
}
